package com.opentae.data.mall.interfaces;

import com.opentae.core.mybatis.config.MyBatisRepository;
import com.opentae.core.mybatis.mapper.Mapper;
import com.opentae.data.mall.beans.ManagerPermission;
import com.opentae.data.mall.beans.RolePermission;
import com.opentae.data.mall.beans.UserPermission;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.List;

/**
 * 
 * Created by exampleCreater.
 */
@MyBatisRepository("tae_mall_managerPermissionMapper")
@Scope("singleton")
@Lazy(true)
public interface ManagerPermissionMapper extends Mapper<ManagerPermission> {
    List<UserPermission> selPermissionByUserId(@Param("userId")Long userId);

    List<RolePermission> selPermissiontagsByroleIds(@Param("roleIds")String roleIds);

    List<RolePermission> selPermissiontagsByroleTag(@Param("roleTag")String roleTag);

    List<RolePermission> selPermissiontagsByroleIdsAndPid(@Param("roleIds")String roleIds, @Param("pids")String pids);
}
